package cn.tpshion.config.common;

import lombok.Data;

/**
 * 业务异常类
 */
@Data
public class BusinessException extends RuntimeException {

    private String code;

    private String msg;

    public BusinessException(String code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public BusinessException(ErrorCode errorCode){
        this.code = errorCode.getCode();
        this.msg = errorCode.getMsg();
    }
}
